home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 15
/
CU Amiga Magazine's Super CD-ROM 15 (1997)(EMAP Images)(GB)[!][issue 1997-10].iso
/
CUCD
/
Graphics
/
Ghostscript
/
source
/
pv.sh
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
1994-07-27
|
455b
|
23 lines
#!/bin/sh -f
#
# pv - preview a specified page of a dvi file in a Ghostscript window
# usage: pv page file
#
# pv converts the given page to PostScript and displays it
# in a Ghostscript window.
#
if [ $# -lt 2 ] ;then
echo usage: $0 'page_number file_name[.dvi]'
exit 1
fi
RESOLUTION=100
TEMPDIR=.
PAGE=$1
shift
FILE=$1
shift
trap "rm -rf $TEMPDIR/$FILE.$$.pv" 0 1 2 15
dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
gs $FILE.$$.pv
exit 0